from django.shortcuts import get_list_or_404
from django.template import Library

from user.models import CustomUser
register = Library()

@register.filter()
def my_lower(value):
    """Convert a string into all lowercase."""
    return value.lower()


@register.simple_tag()
def get_user():
    user = get_list_or_404(CustomUser)
    return user
